#include "./include/pointlist.h"

void pointlist_init(struct pointlist *pl_tmp)
{
	pl_tmp->next = pl_tmp;
	pl_tmp->prev = pl_tmp;
}

void pointlist_add_tail(struct pointlist *pl_head, struct pointlist *pl_new)
{
	pointlist_init(pl_new);
	pl_new->next = pl_head;
	pl_new->prev = pl_head->prev;
	pl_head->prev->next = pl_new;
	pl_head->prev = pl_new;
}

void pointlist_del(struct pointlist *prev, struct pointlist *next)
{
	next->prev = prev;
	prev->next = next;
}